How to push a new local branch to remote repo and track it too [git]
        Posted  
        
            by Roni Yaniv
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Roni Yaniv
        
        
        
        Published on 2010-05-04T12:58:34Z
        Indexed on 
            2010/05/04
            13:38 UTC
        
        
        Read the original article
        Hit count: 1995
        
I tried looking for a an answer to this, but couldn't find any which address this specific need. Which is weird.
I want to be able to do the following:
- create a local branch based on some other (remote or local) branch (via 
git branchorgit checkout -b) - push the local branch
to remote repo (publish), but make it
trackable so 
git pullandgit pushwill work immediately. 
How do I do that?
EDIT: I know about --set-upstream in git 1.7, but that is a post-creation action. i want to find a way to make a similar change when pushing the branch to the remote repo.
© Stack Overflow or respective owner